home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / H-I / HypertalkTools.cpt / Menus For HyperCard™ / card_4417.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  92 lines

  1. -- card: 4417 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2721
  5. -- name: ShowMenu
  6. ----- HyperTalk script -----
  7. on arrowKey direction
  8.   if direction is "right" then
  9.     visual effect dissolve
  10.     go to card "index card"
  11.   else pass arrowKey
  12. end arrowKey
  13.  
  14. on doMenu what
  15.   if what is in "First Next Last" then
  16.     visual effect dissolve
  17.     go to card "index card"
  18.   else pass doMenu
  19. end doMenu
  20.  
  21.  
  22.  
  23. -- part 1 (button)
  24. -- low flags: 00
  25. -- high flags: A003
  26. -- rect: left=323 top=270 right=287 bottom=453
  27. -- title width / last selected line: 0
  28. -- icon id / first selected line: 0 / 0
  29. -- text alignment: 1
  30. -- font id: 0
  31. -- text size: 12
  32. -- style flags: 0
  33. -- line height: 16
  34. -- part name: Go See NewMenu
  35. ----- HyperTalk script -----
  36. on mouseUp
  37.   go to card id 3302
  38.   Find "ShowMenu" in field "Description"
  39. end mouseUp
  40.  
  41.  
  42.  
  43. -- part 2 (button)
  44. -- low flags: 00
  45. -- high flags: 0001
  46. -- rect: left=261 top=304 right=331 bottom=293
  47. -- title width / last selected line: 0
  48. -- icon id / first selected line: 0 / 0
  49. -- text alignment: 1
  50. -- font id: 0
  51. -- text size: 12
  52. -- style flags: 0
  53. -- line height: 16
  54. -- part name: 
  55.  
  56.  
  57. -- part contents for background part 20
  58. ----- text -----
  59. 8
  60.  
  61. -- part contents for background part 1
  62. ----- text -----
  63. XCMD
  64.  
  65. -- part contents for background part 22
  66. ----- text -----
  67. ShowMenu(menuNumber)
  68.  
  69. -- part contents for background part 13
  70. ----- text -----
  71. ShowMenu is an XCMD (external command) that will redisplay any menus you've added to HyperCard using the NewMenu XFCN.  HyperCard doesn't know you've added menus, and if you change userLevels or use the paint tools HyperCard will erase your menus accidentally.  It doesn't mean it, it just doesn't know any better.  An example of using ShowMenu would be:
  72.  
  73. on idle
  74.   global myMenu
  75.   ShowMenu myMenu 
  76.   pass idle
  77. end idle
  78.  
  79. Again, the menu number should be the same number that was returned by NewMenu.
  80.  
  81. For a more efficent method of use, see the sample script provided with NewMenu.
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.